home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Light ROM 1
/
LIGHT-ROM 1 (Amiga Library Services)(1994).iso
/
ffdisks
/
d936.lha
/
TKEd
/
Rexx
/
Comment-Block.tked
next >
Wrap
Text File
|
1993-12-20
|
2KB
|
61 lines
/** -----------------------------------------------------------
** ARexx program to comment out a selected block
** -----------------------------------------------------------
** AREXX-Programm, um einen markierten Block auszukommentieren
** -----------------------------------------------------------
**
** © Tom Kroener '92
**
**/
options results
address 'TKEd.1' /* Portname of the first started TKEd */
Indent "OFF" /* No unwanted indents */
/* uncomment this for AREXX- or C- programs */
/*
scom = "/** "
mcom = " ** "
ecom = " **/"
*/
/* uncomment this for Modula2- or Oberon- programs */
scom = "(** "
mcom = " ** "
ecom = " **)"
/* uncomment this for Assembler- programs */
/*
scom = ";* "
mcom = ";* "
ecom = ";* "
*/
FirstMarkedLine /* Look for the start of the block */
Start = result
IF Start = -1 THEN
DO; Request1 "No block marked" /* Request and exit if nothing marked */
EXIT 10
END
GetLineNr /* Get number of the last marked line */
End = result-1 /* Cursor stands in the first unmarked
line */
UnmarkBlock
GotoLine Start
BeginOfLine
WriteString scom /* Write start of comment */
DO WHILE Start < END /* Write until end of block */
BeginOfLine
Cursor "DOWN" /* One line down */
WriteString mcom /* Write comment */
Start = Start + 1 /* Increment the counter for the lines */
END;
EndOfLine /* All lines commented out */
MakeReturn /* Insert a blank line for better looking */
WriteString ecom /* Write end of the comment */
EXIT 0 /* ciao */